package com.wbc.smartHome.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Component
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "社区活动模型类")
public class CommunityActivities implements Serializable {
    @ApiModelProperty(value = "社区活动id")
    private Integer id;
    @ApiModelProperty(value = "管理员id")
    private Integer adminId;
    @ApiModelProperty(value = "活动名字")
    private String title;//活动名字
    @ApiModelProperty(value = "人数限制")
    private Integer personNum;//人数限制
    @ApiModelProperty(value = "封面图")
    private String img;//封面图
    @ApiModelProperty(value = "主办方")
    private String organizers;//主办方
    @ApiModelProperty(value = "举办人的联系电话")
    private String phone;//举办人的联系电话
    @ApiModelProperty(value = "活动地点")
    private String address;//活动地点
    @ApiModelProperty(value = "补充信息")
    private String note;//补充信息
    @ApiModelProperty(value = "场地面积")
    private String area;//场地面积
    @ApiModelProperty(value = "具体内容")
    private String content;//具体内容
    @ApiModelProperty(value = "社区活动标签")
    /*为对象类*/
    private List<CommunityActivitiesLabel> communityActivitiesLabelList;
    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//接收前端提交数据的日期格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//后端向前端转json时的日期格式
    private Date startTime;//开始时间
    @ApiModelProperty(value = "操作时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//接收前端提交数据的日期格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//后端向前端转json时的日期格式
    private Date operTime;//开始时间
    @ApiModelProperty(value = "操作人")
    private String adminName;
    @ApiModelProperty(value = "flag=3表示社区活动")
    private Integer flag = 3;


    @ApiModelProperty(value = "关键字")
    private String Keyword;
    @ApiModelProperty(value = "当前页码显示")
    private Integer pageNo;//当前页码显示
    @ApiModelProperty(value = "每页显示的数量")
    private Integer pageSize;//每页显示的数量


    @ApiModelProperty(value = "排序标签 null为默认,1为最新发表，2为最早开始，3为最热门")
    private Integer sortFlag;
}
